<template>
	<view>
		<view @click="goBack()" class="padding-30 absolute" style="z-index: 9;">
			<image src="../../static/img/back_f.png" style="width: 30rpx;height: 30rpx;margin: 0 auto;"></image>
		</view>
		<view class="detail_banner">
			<swiper autoplay='true' class="swiper">
				<swiper-item v-for="(item,index) in info.images_do" :key='index'>
					<view class="swiper-item">
						<image :src="item" mode="aspectFit"></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
		
		<view class="padding-30 bg-fff">
			<view class="fs-32 color-333">{{info.title}}</view>
			<view class="margin-top-30 flex align-center">
				<view class="color-zhuse fs-32">¥<text class="fs-40">{{info.price}}/</text>{{timeArr[info.time-1]}}</view>
				<!-- <view class="fs-26 color-999 margin-left-40">押一付一</view> -->
			</view>
			<view class="flex align-center justify-between margin-top-30">
			<!-- 	<view class="flex1 text-center">
					<view class="fs-28 color-333">{{info.flat}}</view>
					<view class="fs-24 color-999 margin-top-10">房型</view>
				</view> -->
				<view class="flex1 text-center">
					<view class="fs-28 color-333">{{info.area}}cm²</view>
					<view class="fs-24 color-999 margin-top-10">面积</view>
				</view>
				<view class="flex1 text-center">
					<view class="fs-28 color-333">{{info.floor}}</view>
					<view class="fs-24 color-999 margin-top-10">楼层</view>
				</view>
				<view class="flex1 text-center">
					<view class="fs-28 color-333">{{info.flat}}</view>
					<view class="fs-24 color-999 margin-top-10">朝向</view>
				</view>
			</view>
		</view>
		
		<view class="w100 bg-f7f7f7" style="height: 10rpx;"></view>
		
		<view class="padding-30 bg-fff" style="padding-bottom: 160rpx;">
			<view class="fs-30 color-000">房屋简介</view>
			<view class="fs-26 color-666 margin-y-10">{{info.describe}}</view>
			<!-- <view class="flex align-center flex-wrap margin-y-30">
				<view class="fs-20 color-333 bg-f7f7f7 radius48 margin-right-24" style="padding:14rpx 50rpx;">有电视</view>
				<view class="fs-20 color-333 bg-f7f7f7 radius48 margin-right-24"  style="padding:14rpx 50rpx;">有电视</view>
			</view> -->
			
			<view class="flex align-center margin-top-40">
				<image style="width: 100rpx;height: 100rpx;border-radius: 100%;" :src="member.avatar"></image>
				<view class="margin-left-24">
					<view class="fs-30 color-000">{{member.name}}</view>
					<!-- <view class="fs-20 color-666">房产销售顾问</view> -->
				</view>
			</view>
			
		</view>
		
		<view class="fixed w100 padding-y-24 flex align-center justify-center bg-fff" style="bottom: 0;box-shadow: 0 0 20rpx #eee;">
			<view @click="toCall()" class="fs-28 color-fff callBtn text-center">电话联系</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				house_id:'',
				info:{},
				member:{},
				timeArr:['天','周','月','年'],
			}
		},
		onLoad(opt) {
			this.house_id = opt.id;
			this.getInfo()
		},
		methods:{
			getInfo(){
				this.$api.house_detail({house_id:this.house_id}).then(res=>{
					if(res.code == 1){
						this.info = res.data;
						this.member = res.data.member
					}
				})
			},
			
			toCall(){
				uni.makePhoneCall({
				    phoneNumber: this.member.mobile
				});
			},
		}
	}
</script>

<style>
	page{background: #fff;}
</style>
<style lang="scss" scoped>
/* 商品详情 */
.detail_banner{
	.swiper,.swiper-item{
		width: 750rpx;
		height:500rpx;
		image{
			width: 750rpx;
			height: 500rpx;
		}
	}
}
.callBtn{
	width: 500rpx;height: 84rpx;line-height: 84rpx;border-radius: 10rpx; background: linear-gradient(to bottom,#FDA730,#FE810A);
}
</style>
